<!--
 * @Author: lmk
 * @Date: 2021-11-15 10:11:34
 * @LastEditTime: 2021-12-17 17:25:31
 * @LastEditors: lmk
 * @Description: 展会列表
-->
<template>
	<mescroll-uni  @init="mescrollInit"   @down="downCallback" @up="upCallback">
		<view class="u-padding-left-32 u-padding-right-32  u-padding-bottom-32">
		 <item-search placeholder="请输入展会标题" @change="downCallback" v-model="form.name"></item-search>
		</view>
		<view class="u-padding-left-32 u-padding-right-32 swiper-box-padding " v-if="dataList.length">
			<view  v-for="(item,index) in dataList" :key="index" class="u-margin-bottom-20" @click="goPathDetail(item)">
				<list-item  :showFooterRightStar="false" :isAvatar="false"  :isShare="false" :item="item" :showStar="false" width="214" height="230">
					<view slot="name" class="box-title  text-bold u-font-36 u-line-2 item-name">
						{{item.name}}
					</view>
					<view slot="content" class="u-margin-top-24 u-marign-bottom-4">
						<view class="day-color u-font-20">{{item.beginTime | dayFormatZH}}-{{item.endTime | dayFormatZH}}</view>
						<view class="text-white-black-reversal u-font-28 u-margin-top-20">
							<view v-if="item.issueTicketId>0 && item.issueExhibitionPrice>0">发行票 <text class="text-color-txtTheme u-margin-left-20">¥ {{item.issueExhibitionPrice}}</text></view>
							<view v-else>暂无发行票</view>
						</view>
						<view class="text-white-black-reversal u-font-28 u-margin-top-20 address">
							<view v-if="item.storeTicketId>0 && item.storeExhibitionPrice>0">店家票 <text class="text-color-txtTheme u-margin-left-20">¥ {{item.storeExhibitionPrice}}</text></view>
							<view v-else>暂无店家票</view>
						</view>
					</view>
				</list-item>
			</view>
		</view>
	</mescroll-uni>
</template>

<script>
	import itemSearch from '@/components/itemSearch/itemSearch.vue'
	import upCallback from '@/mixins/upCallbackMixin.js'
	export default {
    name:'exhibitionList',
		mixins:[upCallback],
		components: {
			itemSearch
		},
		data() {
			return {
				apiModule:'shopApi',
				apiType:'exhibitCalendar',
				name:"getExhibitCalendars",
				form:{
					name:'',
				},
			}
		},
		// watch:{
		// 	inputName(val){
		// 		this.$u.debounce(()=>{
		// 			this.form.name = val;
		// 			this.downCallback();
		// 		},300)
		// 	}
		// },
		methods: {
			goPathDetail(item){
				this.$emit('goPathDetail',item);
				this.$u.route({
					url:'/pagesB/exhibitionCalender/exhibitionDetail',
					params:{
						id:item.id
					}
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.item-name{
		line-height: 40rpx;
	}
</style>
